<p id="notice"><%= notice %></p>

<h1>Cars</h1>

<table>
  <thead>
    <tr>
      <th>Make</th>
      <th>Model</th>
      <th>Year</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @cars.each do |car| %>
      <tr>
        <td><%= car.make %></td>
        <td><%= car.model %></td>
        <td><%= car.year %></td>
        <td><%= link_to 'Show', car %></td>
        <td><%= link_to 'Edit', edit_car_path(car) %></td>
        <td><%= link_to 'Destroy', car, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Car', new_car_path %>
